{include file="public/header" /}



<div class="page">
    <form id="add_form" method="post" enctype="multipart/form-data" >
        <input type="hidden" id="submit_type" name="submit_type" />
        <table class="ds-default-table">
            <tbody>
            <tr class="noborder">
                <td class="required w120"><label class="validation">抢购价格:</label></td>
                <td class="vatop rowform">
                    <input type="text" id="groupbuy_price" name="groupbuy_price" value="{$setting.groupbuy_price}" class="txt">
                </td>
                <td class="vatop tips">抢购套餐价格，单位为元，购买周期为月(30天)</td>
            </tr>
            <tr class="noborder">
                <td class="required"><label class="validation">抢购审核期:</label></td>
                <td class="vatop rowform">
                    <input type="text" id="groupbuy_review_day" name="groupbuy_review_day" value="{$setting.groupbuy_review_day}" class="txt">
                </td>
                <td class="vatop tips">抢购审核期(天)，平台预留的审核天数，卖家只能发布审核期天数以后的抢购活动</td>
            </tr>
            </tbody>
            <tfoot>
            <tr class="tfoot">
                <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span>{$Think.lang.ds_submit}</span></a></td>
            </tr>
            </tfoot>
        </table>
    </form>

</div>

<script>
    $(document).ready(function(){
        $("#submitBtn").click(function(){
            $("#add_form").submit();
        });
        //页面输入内容验证
        $("#add_form").validate({
            errorPlacement: function(error, element){
                error.appendTo(element.parent().parent().find('td:last'));
            },

            rules : {
                groupbuy_price: {
                    required : true,
                    digits : true,
                    min : 0
                },
                groupbuy_review_day:{
                    required : true,
                    digits : true,
                    min : 0
                }
            },
            messages : {
                groupbuy_price: {
                    required : '必填',
                    digits : '值为正整数',
                    min : '最小'
                },
                groupbuy_review_day:{
                    required : '必填',
                    digits : '值为正整数',
                    min : '最小'
                }
            }
        });
    });
    //submit函数
    function submit_form(submit_type){
        $('#submit_type').val(submit_type);
        $('#add_form').submit();
    }
</script>